/**
 * 
 */
package org.vsg.stock.core.domain;

import java.io.Serializable;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.Proxy;

/**
 * @author Bill vison
 *
 */
@Entity
@Table(name = "CATEGORY")
@Proxy(lazy = false)
public class StockCategory implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -4491480978313431561L;

	public static final String SAME_STOCKHOLDER = "sameStockHolder";

	public static final String CONCEPT = "concept";

	public static final String TRADES = "trades";

	public static final String ZONE = "zone";
	
	public static final String STANDARD_TRADES = "standardTrades";

	public static final String OTHERS = "others";
	
	public static final String PLATE = "plate";
	
	@javax.persistence.ManyToMany(
	   		cascade = {javax.persistence.CascadeType.PERSIST, javax.persistence.CascadeType.MERGE},
	    	mappedBy = "assoStockCategory",
	    	targetEntity = StockInfo.class,
	    	fetch = javax.persistence.FetchType.EAGER
		)	
	private List<StockInfo> assoStockInfos;
	
	@Id @Column(name="ID_CATEGORY")
	private String id;

	@Column(name="DESCRIPTION")		
	private String description;

	@Column(name="TYPE")		
	private String type;


	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public List<StockInfo> getAssoStockInfos() {
		return assoStockInfos;
	}

	public void setAssoStockInfos(List<StockInfo> assoStockInfos) {
		this.assoStockInfos = assoStockInfos;
	}

	
	
}
